<style lang="scss">

</style>


<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
import totree from 'totree'
import {chooseSystem} from '@/api/commonApi';
export default {
  name: 'App',
  data() {
    return {
      menus: []
    }
  },
  created() {
    this.chooseSystemAsync();
  },
  methods: {
    async chooseSystemAsync() {
      let {code,data,msg} = await chooseSystem({
        privilegeId: 1
      });
      if(code=='00000') {
        this.menus = totree(data,'privilegeId','parentId')
        // console.dir(this.menus);
      }

    }
  }
}
</script>

